The increasing number of devices connected to the Internet has led to an ever increasing amount of data associated with the devices and users of the devices. It is desirable to obtain real-time data about such devices and users and store such data for later analysis. Current data analytics tools can count users and devices in real-time. With the increasing number of users and devices, the ability to count and the store data related to the large number of users and devices has become increasingly expensive, both computationally and economically. Additionally, current tools do not allow granular flexibility to compute separately multiple different segments of users and devices and store and index those segments. For example, it has become increasing difficult to not only keep track of the number of individual users of a website, but also to keep track of the different devices that a user accesses the website from and of a particular user's habits while on the website on each device. In this example, current analytics tools provide a website owner with various counts, such as number of people visiting the website and number of people purchasing goods from the website. However, these current analytics tools lack the ability to provide more specific information about users and devices and require the website owner to make a number of inferences regarding the meaning of the data counts.